// by Xeno
private ["_vehicle"];
#include "x_setup.sqf"

#define __Poss _poss = x_sm_pos select 0;
#define __PossAndOther _poss = x_sm_pos select 0;_pos_other = x_sm_pos select 1;

#ifdef __TT__
x_sm_pos = [[2949.0532,6169.8662,0], [2992.6909,6159.4678,0]]; // index: 2,   steal plane prototype, Paraiso airfield, second array position armor
#endif
#ifndef __TT__
x_sm_pos = [[5083.69,5741.33,0], [5165.52,5729.92,0]]; //  steal plane prototype, Balota, second array position armor (Paraiso in TT version)
#endif
x_sm_type = "normal"; // "convoy"

#ifdef __SMMISSIONS_MARKER__
if (true) exitWith {};
#endif

if (X_Client) then {
	#ifdef __TT__
	d_current_mission_text = "The enemy is testing a new protoype plane at Smuggler's Airport. Steal it and bring it to the flag at your base.";
	d_current_mission_resolved_text = "Good job. You got the prototype plane.";
	#endif
	#ifndef __TT__
	d_current_mission_text = "Our enemies have installed air conditioning in one of their transport vehicles. Steal it and bring it to the flag at your base.";
	d_current_mission_resolved_text = "Good job, you got the bus.  Now all we need to do is install a toilet.";
	#endif
};

if (isServer) then {
	_xplane = (if (d_enemy_side == "EAST") then {"Ikarus"} else {"Ikarus"});
	__PossAndOther
	_hangar = "Land_sara_hasic_zbroj" createvehicle (_poss);
	_hangar setDir 180;
	__AddToExtraVec(_hangar)
	sleep 1.0123;
	_vehicle = objNull;
	_vehicle = _xplane createvehicle (_poss);
	_vehicle setDir 90;
	sleep 2.123;
	["specops", 1, "basic", 1, _poss,100,true] spawn XCreateInf;
	sleep 2.221;
	["uaz_mg", 1, "uaz_grenade", 1, "brdm", 1, _pos_other,1,100,true] spawn XCreateArmor;
	[_vehicle] execVM "x_missions\common\x_sidesteal.sqf";
	allunits_add set [count allunits_add, _vehicle];
};

if (true) exitWith {};